package shuiguo;


    public class FruitTest {
        public static void main(String[] args) {
            Fruit fruit1 = new Apple();
            fruit1.setName("苹果");
            fruit1.setArea("云南");
            fruit1.setPrice(10);
            System.out.println(fruit1);

            Fruit  fruit2 = new Banana();
            fruit2.setName("香蕉");
            fruit2.setArea("云南");
            fruit2.setPrice(10);
            System.out.println(fruit2);

            Fruit  fruit3 = new  Pineapple  ();
            fruit3.setName("菠萝");
            fruit3.setArea("云南");
            fruit3.setPrice(10);
            System.out.println(fruit3);
        }
    }

